#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/ant.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk

JAVA_HOME            := /usr/lib/jvm/java-gcj
DEB_JARS             := ant-launcher antlrall ant-antlr
DEB_ANT_CLEAN_TARGET := clean
DEB_ANT_BUILD_TARGET := all javadoc
DEB_BUILDDIR         := jogl/make

install/libjogl-java::
	install -m 644 -D jogl/build/jogl.jar debian/libjogl-java/usr/share/java/jogl-$(DEB_UPSTREAM_VERSION).jar
	ln -s jogl-$(DEB_UPSTREAM_VERSION).jar debian/libjogl-java/usr/share/java/jogl.jar
	install -m 644 -D gluegen/build/gluegen-rt.jar debian/libjogl-java/usr/share/java/gluegen-rt-$(DEB_UPSTREAM_VERSION).jar
	ln -s gluegen-rt-$(DEB_UPSTREAM_VERSION).jar debian/libjogl-java/usr/share/java/gluegen-rt.jar

install/libjogl-jni::
	install -m 644 -D jogl/build/obj/libjogl.so debian/libjogl-jni/usr/lib/jni/libjogl.so
	install -m 644 -D jogl/build/obj/libjogl_awt.so debian/libjogl-jni/usr/lib/jni/libjogl_awt.so
# Commented since Cg is not available under Debian
#	install -m 644 -D jogl/build/obj/libjogl_cg.so debian/libjogl-jni/usr/lib/jni/libjogl_cg.so
	install -m 644 -D gluegen/build/obj/libgluegen-rt.so debian/libjogl-jni/usr/lib/jni/libgluegen-rt.so

clean::
	$(RM) -r gluegen/build

get-orig-source::
	-uscan --upstream-version 0
